<template>
  <div>
    <order-header :title="title" :tip="tip">
      <template v-slot:tip>
        <span>{{ tip }}</span>
      </template>
    </order-header>
    <router-view></router-view>
    <service-bar></service-bar>
    <nav-footer></nav-footer>
  </div>
</template>

<script>
import OrderHeader from "@/components/content/orderHeader/orderHeader";
import NavFooter from "@/components/common/NavFooter/NavFooter";
import ServiceBar from "@/components/common/ServiceBar/ServiceBar";

export default {
  name: "order",
  components: {ServiceBar, NavFooter, OrderHeader},
  data() {
    return {
      title: "",
      tip: '',
    }
  },
  mounted() {
    //获取当前路由地址
    let path = this.$route.path;
    /*这里修改为每个页面调用，这里不做更改了0.0  */
    if (-1 !== path.indexOf('orderConfirm')) {//订单确认
      this.title = '订单确认'
      this.tip = '这是一条提示信息'
    } else if (-1 !== path.indexOf('list')) {//订单列表
      this.title = '订单列表'
      this.tip = '请谨防钓鱼链接或者诈骗电脑，了解更多>'
    } else if (-1 !== path.indexOf('pay')) {//订单列表
      this.title = '订单支付'
      this.tip = '请谨防钓鱼链接或者诈骗电脑，了解更多>'
    } else if (-1 !== path.indexOf('alipay')) {//订单列表
      this.title = '订单支付'
      this.tip = '请谨防钓鱼链接或者诈骗电脑，了解更多>'
    }

  }
}
</script>

<style scoped>

</style>
